import {ExtensionCategory, Graph, Line, Quadratic, register} from '@antv/g6';

class AntLine extends Quadratic {
    onCreate() {
        const shape = this.shapeMap.key;
        shape.animate([{lineDashOffset: 20}, {lineDashOffset: 0}], {
            duration: 500,
            iterations: Infinity,
        });
    }
}

function registerEdge() {
    register(ExtensionCategory.EDGE, 'ant-line', AntLine);
}

export default registerEdge;
